Trilium has always supported Markdown through its import feature, however the file was either transformed to a Text note (converted to Trilium's internal HTML format) or saved as a Code note with only syntax highlight.
This note type is a split view, meaning that both the source code and a preview of the document are displayed side-by-side. See Note types with split view for more information.
The goal of this note type is to fill a gap: rendering Markdown but not altering its structure or its whitespace which would inevitably change otherwise through import/export.
Even if Markdown is now specially treated by having a preview mechanism, Trilium remains at its core a WYSWYG editor so Markdown will not replace text notes.
The following features are supported by Trilium's Markdown format and will show up in the preview pane:
All standard and GitHub-flavored syntax (basic formatting, tables, blockquotes).
Basic HTML is also supported (e.g. collapsible blocks using <details> and
<summary>).
Code blocks with syntax highlight.
Math Equations (both inline and block)
Mermaid Diagrams using
```mermaid
Include Note (no built-in Markdown syntax, but HTML syntax works just fine):
<section class="include-note" data-note-id="vJDjQm0VK8Na" data-box-size="expandable">
</section>
/include command
or via a dedicated keyboard shortcut (not assigned by default).Internal (reference) links via its HTML syntax, or through a Wikilinks-like format (only Note ID):
[[Hg8TS5ZOxti6]]
Footnotes are also supported via the corresponding Markdown syntax:
This is [^1], while this is [^2].
[^1]: the first footnote
[^2]: the second footnote
/footnote command.Multiple types of links are supported:
Web URLs can be written with the standard Markdown syntax:
[Wikipedia](https://www.wikipedia.org)
Reference link to other notes with dynamic title, either by manually entering the note ID or via the Add link dialog:
[[B9oMG6rFvvfq]]
Reference link to other notes with a custom text:
[This is a link](#root/LhtnZxtVsUMp)
To create a link, either:
/link command.The Markdown notes share some of the keyboard shortcuts from Text notes:
In addition, the following formatting keyboard shortcuts are available:
$).Images can be inserted into the document in four different methods:
/image slash command.An image reference to an attachment looks like this:

Just like Text notes, Markdown notes support a selection of slash commands:
/tip)/image)./date).Note that slash commands only work outside of inline
When a Markdown note is shared publicly, it will be rendered with extended formatting just like Text notes.
Most of the features described previously should be supported. If you face any issues, feel free to report it alongside a sample Markdown file.
There are two ways to create a Markdown note:
By default, when importing a single Markdown file it automatically gets converted to a Text note. To avoid that and have it imported as a Markdown note instead:
When importing a Trilium ZIP, it will preserve the Markdown type without converting to text notes thanks to the meta-information in it.
When exporting Markdown files, the extension is preserved and the content remains the same as in the source view (with some small exceptions such as handling of attachments).
When exporting Markdown files as ZIP, choosing HTML or Markdown as the export format makes no difference as that only affects Text notes.
If the Markdown note contains attachments, a ZIP export will rewrite the links to attachments so that they are replaced with a relative path to the attachment. On import, the links are re-written back.
Currently there is no built-in functionality to convert a Text note into a Markdown note or vice-versa. We do have plans to address this in the future.
This can be achieved manually, for a single note:
For multiple notes, the process is slightly more involved:
!!!meta.json file.When scrolling through the editing pane, the preview pane will attempt to synchronize its position to make it easier to see the preview.
In addition, the block in the preview matching the position of the cursor in the source view will appear slightly highlighted.
The sync is currently one-way only, scrolling the preview will not synchronize the position of the editor.
This feature cannot be disabled as of now; if the scrolling feels distracting, consider temporarily switching to the editor mode and then switching to preview mode when ready.